﻿@model List<_2._13._2015_VehiclesInClass.Models.Vehicle>

@{
    ViewBag.Title = "Home Page";
}


<div class="row">
    <div class="col-md-12">
        <p></p>
        @if (Model.Any())
        {
            <table class="table table-bordered table-striped">
                <tr>
                    <th>Make</th>
                    <th>Model</th>
                    <th>Year</th>
                    <th>Edit</th>
                </tr>
                @foreach (var x in Model)
                {
                    <tr>
                        <td>@x.Make</td>
                        <td>@x.Model1</td>
                        <td>@x.Year</td>
                        <td>@Html.ActionLink("Edit", "UpdateCar", "Home", new { id = x.Id }, new { @class = "btn btn-default" })</td>
                    </tr>
                }
            </table>
        }
        else
        {
            <p>No vehicles available yet.  Go make some!</p>
        }        
    </div>
</div>